package com.lvshh.eventdemo.controller;

import com.lvshh.eventdemo.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Resource
    UserService userService;

    @GetMapping("/register")
    public String register(String username){
        userService.register(username);
        return "success";

    }
}
